#ifndef MEMPOOL_H
#define MEMPOOL_H

#include <cstddef>
class MemoryPool {
public:
    MemoryPool(size_t blockSize, size_t blockCount);
    ~MemoryPool();

    void* allocate();
    void deallocate(void* ptr);

private:
    void initFreeList();

    void* memory;
    void* freeList;
    size_t blockSize;
    size_t blockCount;
};

#endif